Extremely high virtual memory usage

Extremely high virtual memory usage

am 26.09.2009 17:14:14 von Igor Katson

I am facing an extremely high virtual memory usage by apache. In fact it
is not using as much swap space as it shows, but if there are many
threads, apache starts swapping extensively and the system becomes
totally unresponsive.

Look at the "VIRT" column (this is the output of top)

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
7449 www-data 20 0 6007m 93m 2760 S 13 1.2 0:06.97 apache2
865 www-data 20 0 5882m 111m 4848 S 0 1.4 0:43.21 apache2
4180 www-data 20 0 5745m 84m 4856 S 0 1.1 0:01.42 apache2
32608 www-data 20 0 5386m 70m 2864 S 0 0.9 0:01.26 apache2
7450 www-data 20 0 5145m 92m 4716 S 17 1.2 0:06.65 apache2
7135 www-data 20 0 5138m 92m 4712 S 14 1.2 0:06.65 apache2
28893 www-data 20 0 5058m 96m 2868 S 0 1.2 0:07.43 apache2
26227 island 20 0 5015m 1.7g 5460 S 0 21.2 1:49.72 java
15773 www-data 20 0 4931m 93m 2828 S 0 1.2 0:17.83 apache2
1124 www-data 20 0 4612m 27m 4832 S 0 0.3 1:39.70 apache2
7018 www-data 20 0 4597m 96m 4844 S 0 1.2 0:24.83 apache2
10690 www-data 20 0 4482m 27m 2860 S 0 0.3 0:00.09 apache2
4811 www-data 20 0 4264m 63m 2868 S 0 0.8 0:00.64 apache2
12061 www-data 20 0 3003m 53m 4832 S 0 0.7 1:07.48 apache2
5164 www-data 20 0 2781m 53m 4832 S 0 0.7 0:00.31 apache2
28266 www-data 20 0 2774m 89m 4816 S 0 1.1 0:26.60 apache2

I tried disabling mod_jk (the most used one, as the backend is tomcat),
and wsgi (because it is custom built), but the situation is the same. As
soon as I start apache, some processes are eating around 5 GiB of VIRT
memory, but as time passes, other apache instances eat virtual memory
quickly.

How can I debug the problem? What can the possible reasons be?

OS: Debian Lenny, fully up to date
apache2 package version: 2.2.9-10+lenny4
MPM: worker
Enabled modules: alias auth_basic authn_file authz_default
authz_groupfile authz_host authz_user cache cgid deflate dir disk_cache
env headers jk mime proxy proxy_http rewrite rpaf setenvif status wsgi

Worker configuration:

StartServers 4
ThreadLimit»»···512
MaxClients 2048
MinSpareThreads 64
MaxSpareThreads 128·
ThreadsPerChild 512
MaxRequestsPerChild 0


------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org

Re: Extremely high virtual memory usage

am 27.09.2009 20:16:52 von Steve

--001485f794928306570474932f64
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

I also face a similar problem.
I find that after 5 days I'm hitting swap space and have to reboot.

Does no one here on the list have any advice on how to find these sorts of
issues? Command line tools, directories to look in, etc?

Any suggestions would be greatly appreciated.

Steve


2009/9/26 Igor Katson

> I am facing an extremely high virtual memory usage by apache. In fact it =
is
> not using as much swap space as it shows, but if there are many threads,
> apache starts swapping extensively and the system becomes totally
> unresponsive.
>
> Look at the "VIRT" column (this is the output of top)
>
> PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
> 7449 www-data 20 0 6007m 93m 2760 S 13 1.2 0:06.97 apache2
> 865 www-data 20 0 5882m 111m 4848 S 0 1.4 0:43.21 apache2
> 4180 www-data 20 0 5745m 84m 4856 S 0 1.1 0:01.42 apache2
> 32608 www-data 20 0 5386m 70m 2864 S 0 0.9 0:01.26 apache2
> 7450 www-data 20 0 5145m 92m 4716 S 17 1.2 0:06.65 apache2
> 7135 www-data 20 0 5138m 92m 4712 S 14 1.2 0:06.65 apache2
> 28893 www-data 20 0 5058m 96m 2868 S 0 1.2 0:07.43 apache2
> 26227 island 20 0 5015m 1.7g 5460 S 0 21.2 1:49.72 java
> 15773 www-data 20 0 4931m 93m 2828 S 0 1.2 0:17.83 apache2
> 1124 www-data 20 0 4612m 27m 4832 S 0 0.3 1:39.70 apache2
> 7018 www-data 20 0 4597m 96m 4844 S 0 1.2 0:24.83 apache2
> 10690 www-data 20 0 4482m 27m 2860 S 0 0.3 0:00.09 apache2
> 4811 www-data 20 0 4264m 63m 2868 S 0 0.8 0:00.64 apache2
> 12061 www-data 20 0 3003m 53m 4832 S 0 0.7 1:07.48 apache2
> 5164 www-data 20 0 2781m 53m 4832 S 0 0.7 0:00.31 apache2
> 28266 www-data 20 0 2774m 89m 4816 S 0 1.1 0:26.60 apache2
>
> I tried disabling mod_jk (the most used one, as the backend is tomcat), a=
nd
> wsgi (because it is custom built), but the situation is the same. As soon=
as
> I start apache, some processes are eating around 5 GiB of VIRT memory, bu=
t
> as time passes, other apache instances eat virtual memory quickly.
>
> How can I debug the problem? What can the possible reasons be?
>
> OS: Debian Lenny, fully up to date
> apache2 package version: 2.2.9-10+lenny4
> MPM: worker
> Enabled modules: alias auth_basic authn_file authz_default authz_groupfil=
e
> authz_host authz_user cache cgid deflate dir disk_cache env headers jk mi=
me
> proxy proxy_http rewrite rpaf setenvif status wsgi
>
> Worker configuration:
>
> StartServers 4
> ThreadLimit»»··=B7512
> MaxClients 2048
> MinSpareThreads 64
> MaxSpareThreads 128=B7
> ThreadsPerChild 512
> MaxRequestsPerChild 0
>

>
> ------------------------------------------------------------ ---------
> The official User-To-User support forum of the Apache HTTP Server Project=
..
> See for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> " from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>

--001485f794928306570474932f64
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

I also face a similar problem.


I find that after 5 days =
I'm hitting swap space and have to reboot.=A0

=
Does no one here on the list have any advice on how to find these sorts of =
issues? Command line tools, directories to look in, etc?



Any suggestions would be greatly appreciated.
>
Steve


2009/9/2=
6 Igor Katson < target=3D"_blank">descentspb@gmail.com>

x #ccc solid;padding-left:1ex">
I am facing an extremely high virtual memory usage by apache. In fact it is=
not using as much swap space as it shows, but if there are many threads, a=
pache starts swapping extensively and the system becomes totally unresponsi=
ve.





Look at the "VIRT" column (this is the output of top)



PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND

7449 www-data 20 0 6007m 93m 2760 S 13 1.2 0:06.97 apache2

865 www-data 20 0 5882m 111m 4848 S 0 1.4 0:43.21 apache2

4180 www-data 20 0 5745m 84m 4856 S 0 1.1 0:01.42 apache2

32608 www-data 20 0 5386m 70m 2864 S 0 0.9 0:01.26 apache2

7450 www-data 20 0 5145m 92m 4716 S 17 1.2 0:06.65 apache2

7135 www-data 20 0 5138m 92m 4712 S 14 1.2 0:06.65 apache2

28893 www-data 20 0 5058m 96m 2868 S 0 1.2 0:07.43 apache2

26227 island 20 0 5015m 1.7g 5460 S 0 21.2 1:49.72 java

15773 www-data 20 0 4931m 93m 2828 S 0 1.2 0:17.83 apache2

1124 www-data 20 0 4612m 27m 4832 S 0 0.3 1:39.70 apache2

7018 www-data 20 0 4597m 96m 4844 S 0 1.2 0:24.83 apache2

10690 www-data 20 0 4482m 27m 2860 S 0 0.3 0:00.09 apache2

4811 www-data 20 0 4264m 63m 2868 S 0 0.8 0:00.64 apache2

12061 www-data 20 0 3003m 53m 4832 S 0 0.7 1:07.48 apache2

5164 www-data 20 0 2781m 53m 4832 S 0 0.7 0:00.31 apache2

28266 www-data 20 0 2774m 89m 4816 S 0 1.1 0:26.60 apache2



I tried disabling mod_jk (the most used one, as the backend is tomcat), and=
wsgi (because it is custom built), but the situation is the same. As soon =
as I start apache, some processes are eating around 5 GiB of VIRT memory, b=
ut as time passes, other apache instances eat virtual memory quickly.





How can I debug the problem? What can the possible reasons be?



OS: Debian Lenny, fully up to date

apache2 package version: 2.2.9-10+lenny4

MPM: worker

Enabled modules: alias auth_basic authn_file authz_default authz_groupfile =
authz_host authz_user cache cgid deflate dir disk_cache env headers jk mime=
proxy proxy_http rewrite rpaf setenvif status wsgi



Worker configuration:

<IfModule mpm_worker_module>

StartServers 4

ThreadLimit»»··=B7512

MaxClients 2048

MinSpareThreads 64

MaxSpareThreads 128=B7

ThreadsPerChild 512

MaxRequestsPerChild 0

</IfModule>



------------------------------------------------------------ ---------

The official User-To-User support forum of the Apache HTTP Server Project.<=
br>
See <URL: lank">http://httpd.apache.org/userslist.html> for more info.

To unsubscribe, e-mail: g" target=3D"_blank">users-unsubscribe@httpd.apache.org

=A0" =A0 from the digest: httpd.apache.org" target=3D"_blank">users-digest-unsubscribe@httpd.apache.o=
rg


For additional commands, e-mail: org" target=3D"_blank">users-help@httpd.apache.org






--001485f794928306570474932f64--